-
Notifications
You must be signed in to change notification settings - Fork 5.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix built-in HttpClient metrics documentation #39223
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! 💯
@lmolkova we cannot populate network.protocol.version
when HttpResponseMessage
is missing because of an exception. Can we keep the attribute's Requirement Level Recommended
in the spec, or shall we change it to Conditionally Required
?
https://github.com/open-telemetry/semantic-conventions/blob/main/docs/dotnet/dotnet-http-metrics.md#metric-httpclientconnectionduration
Please merge the PR if you think it's good to go. Thanks 🙇🏻♂️ |
We can keep I'll send a tiny PR to the spec to add a description on the level. |
@antonfirsov @xakep139 does this change apply to all client metrics or to http request duration only? |
Co-authored-by: Liudmila Molkova <limolkova@microsoft.com>
I've found only these usages: @antonfirsov can you please check whether last two are available if there's no response? |
BTW, any reason to report response version and not a since it's a request duration, it seems reasonable to report request version there, no? |
For the other metrics
|
@antonfirsov thanks for the explanation! Do you think general otel semconv could be more specific and specify that the actual protocol version after negotiation should be used? |
Also, is there any benefit in falling back to |
This kind of clarification never hurts, but one should look at version management in other libraries/APIs to phrase it correctly.
IMO this would be misleading. Imagine the following scenario:
|
Folks, this PR was intended to fix the documentation and to reflect the current behavior there. My idea was to fix the docs first, and then if we decide - fix the logic/metrics. |
Apologies for delaying the merge, I wanted to make sure we are on the same page before going ahead. |
Summary
Right now docs say that the network protocol version for
http.client.request.duration
metric is always available, which isn't true: https://github.com/dotnet/runtime/blob/55fbb23f8c4e05a17ee27ea19679813f7f5cf285/src/libraries/System.Net.Http/src/System/Net/Http/Metrics/MetricsHandler.cs#L113Internal previews